<div>
    <h1><%=h @user.name %>'s talks</h1>
    <% if @user_talks.empty? %>
    <h5>No talks yet</h5>
    <% else %>
    <table>
    	<thead>
        <tr>
            <th>
                Star
            </th>
            <th>
                Topic/Body
            </th>
            <th>
                Latest Update At
            </th>
            <th>
                Latest Update By
            </th>
            <th>
                Involved
            </th>
        </tr>
		</thead>
		<tbody id="talk_list">
			<%= render :partial => 'user_talk', :collection => @user_talks%>
		</tbody>
    </table>
    <% end %>
    <br/>
</div>

<p id="add_link">
    <%=
    link_to_function("New Talk",
    "Element.toggle('new_talk')") %>
</p>
<div id="new_talk" style="display:none;">
    <% form_remote_tag :url => {:action => 'new_talk'},
    :html => {:id => 'new_talk_form'} do%>
	<p>
		Topic:
    <%= text_field 'talk', 'topic' %>
  </p>
  Body:
  <p>
    <%= text_area 'talk', 'body' %>
  </p>
  <p>
    <%= submit_tag 'Add', :class => "submit" %>
  </p>
	<% end %>
</div>